import strings from '@/util/strings.js'


export default {
  extends(Vue) {
    let $notify = Vue.prototype.$notify

    $notify.warning = (options) => {
      if (typeof options === 'object') {
        options.type = 'warning'
        return $notify(options)
      }
      let message = options
      return $notify({
        type: 'warning',
        message
      })
    }

    $notify.error = (options) => {
      if (typeof options === 'object') {
        options.type = 'error'
        return $notify(options)
      }
      let message = options
      return $notify({
        type: 'danger',
        message
      })
    }

    $notify.success = (options) => {
      if (typeof options === 'object') {
        options.type = 'success'
        return $notify(options)
      }
      let message = options
      return $notify({
        type: 'success',
        message
      })
    }
  }
}
